package ru.housewife.form;

/**
 * ware form representation on jsp pages.
 * it is temp object - wrapper over ware & prices
 *
 * @author Alexander Troshanin
 */
public class WareFormView {

    private WareForm ware;

    private WareRegionPriceForm regionPrice;

    private WareUserPriceForm userPrice;

    public WareFormView(WareForm ware) {
        this.ware = ware;
    }

    public WareForm getWare() {
        return ware;
    }

    public WareRegionPriceForm getRegionPrice() {
        return regionPrice;
    }

    public void setRegionPrice(WareRegionPriceForm regionPrice) {
        this.regionPrice = regionPrice;
    }

    public WareUserPriceForm getUserPrice() {
        return userPrice;
    }

    public void setUserPrice(WareUserPriceForm userPrice) {
        this.userPrice = userPrice;
    }

    public String getWareRegionPriceStrValue() {
        return regionPrice != null ? String.valueOf(regionPrice.getPrice()) : "-";
    }

    public String getWareUserPriceStrValue() {
        return userPrice != null ? String.valueOf(userPrice.getPrice()) : "-";
    }

}
